extends Button

var link={"line":"1-3","index":0}
var game_scene
var flag_list={"7-3":false,"8-3":false,"9-3":false}

func _ready() -> void:
	game_scene=get_tree().get_first_node_in_group("game_scene")

func _on_pressed() -> void:
	if global.flag_list["level8_pass"]:
		if global.flag_list["level9_enter"]:
			link={"line":"*-3","index":0}
		else:
			link={"line":"9-3","index":0}
	elif global.flag_list["level7_pass"]:
		if global.flag_list["level8_enter"]:
			link={"line":"*-3","index":0}
		else:
			link={"line":"8-3","index":0}
	elif global.flag_list["level6_pass"]:
		if global.flag_list["level7_enter"]:
			link={"line":"*-3","index":0}
		else:
			link={"line":"7-3","index":0}
	global.cur_line=link["line"]
	global.cur_index=link["index"]
	game_scene._chat_in()
